package com.casic.worklog.util;

import java.util.UUID;


/**
 * @author 黄志
 * @date 2019-09-13 14:07
 *
 *
*/
public class CommonUtil {
    /**
     * 生成uuid
     *
     * @return
     */
    public static String uuid() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }
    public static boolean isEmpty(String str){
        if(str==null){
            return true;
        }if("".equals(str.trim())){
            return true;
        }
        return false;
    }

    /**
     * string[]转int[]
     * */
    public static int[] strArrayToIntArray(String[] a){
        int[] b = new int[a.length];
        for (int i = 0; i < a.length; i++) {
            b[i] = Integer.parseInt(a[i]);
        }

        return b;
    }


}
